<template>
	<view class="page">
		<view class="title">
			3.3.v-bind指令配合图片轮播案例
		</view>
		<view class="p">
			<image :src="picurl" mode="widthFix" class="img"></image>
		</view>
	</view>
</template>

<script setup>
	import {
		ref
	} from 'vue'

	const imglist = ref([
		"https://env-00jxt1ebvd3g.normal.cloudstatic.cn/uniapp/i1.jpg",
		"https://env-00jxt1ebvd3g.normal.cloudstatic.cn/uniapp/i2.jpg",
		"https://env-00jxt1ebvd3g.normal.cloudstatic.cn/uniapp/i3.jpg",
		"https://env-00jxt1ebvd3g.normal.cloudstatic.cn/uniapp/i4.jpg",
		"https://env-00jxt1ebvd3g.normal.cloudstatic.cn/uniapp/i5.jpg",
	])
	const picurl = ref()

	let i = 0
	setInterval(() => {
		i++;
		picurl.value = imglist.value[i % 4];
	}, 1000)
</script>

<style lang="scss" scoped>

</style>